from scrapy.spiders import Spider

class DmozSpider(Spider):
    name = "dmoz"
    allowed_domains = ["blog.csdn.net"]
    start_urls = [
        "http://blog.csdn.net/yimingsilence/article/details/52119720"
    ]
    
    def parse(self, response):
        filename = response.url.split("/")[-2]
        open(filename, 'wb').write(response.body)
        
